package com.abbas.CayTcore

import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.LifecycleOwner

class LifecycleOwnerTest: LifecycleOwner {
    override fun getLifecycle(): Lifecycle {
        return MLifecycle()
    }
}


class MLifecycle: Lifecycle() {

    private var state: Lifecycle.State = Lifecycle.State.CREATED

    override fun addObserver(observer: LifecycleObserver) {

    }

    override fun removeObserver(observer: LifecycleObserver) {

    }

    override fun getCurrentState(): State {
        return state
    }


}

enum class MLife{
    none,
    onInited,
    onAttach,
    onDetach
}